import time


def repeat(n):
    def my_decorator(func):
        def wrapper(*args, **keys):
            start_time = time.time()
            print("before")
            for _ in range(n):
                func(*args, **keys)
            print("after")
            print(f"共消耗{time.time()-start_time}")

        return wrapper

    return my_decorator


@repeat(3)
def hello(a, b, c):
    print("hello", a, b, c)


hello("hu", "lei", "chen")
